package com.chidopi.market.bookstore.dao;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

import com.chidopi.cdf.dao.IBaseDao;
import com.chidopi.cdf.dao.ICommonDao;
import com.chidopi.cdf.dao.impl.CommonDaoImpl;
import com.chidopi.market.RootConfig;
import com.chidopi.market.bookstore.dao.impl.Book2CityDaoImpl;
import com.chidopi.market.bookstore.dao.impl.BookCategoriesDaoImpl;
import com.chidopi.market.bookstore.dao.impl.BookCitiesDaoImpl;
import com.chidopi.market.bookstore.dao.impl.BookItemsDaoImpl;
import com.chidopi.market.bookstore.dao.impl.BrandDaoImpl;
import com.chidopi.market.bookstore.dao.impl.City2CategoryDaoImpl;
import com.chidopi.market.bookstore.dao.impl.ContextProviderDaoImpl;
import com.chidopi.market.bookstore.dao.impl.ProductID2BookDaoImpl;
import com.chidopi.market.bookstore.dao.impl.Subscribe4iOSDaoImpl;
import com.chidopi.market.bookstore.dao.impl.SubscriptionsDaoImpl;
import com.chidopi.market.bookstore.domain.Book2City;
import com.chidopi.market.bookstore.domain.BookCategories;
import com.chidopi.market.bookstore.domain.BookCities;
import com.chidopi.market.bookstore.domain.Brand;
import com.chidopi.market.bookstore.domain.City2Category;
import com.chidopi.market.bookstore.domain.ContextProvider;
import com.chidopi.market.bookstore.domain.ProductID2Book;
import com.chidopi.market.bookstore.domain.Subscribe4iOS;
import com.chidopi.market.bookstore.domain.Subscriptions;


@Configuration("bookstoreDaoConfig")
@Import(RootConfig.class)
public class DaoConfig {
	private static Logger logger = LoggerFactory.getLogger(DaoConfig.class);
	@Bean(name="commonDao")
	public ICommonDao commonDao() {
		return new CommonDaoImpl();
	}
	
	@Bean(name="brandDao")
	public IBaseDao<Brand> BrandDao() {
		logger.debug("BrandDao is called!!");
		return new BrandDaoImpl();
	}

	@Bean(name="bookCategoriesDao")	            
	public IBaseDao<BookCategories> BookCategoriesDao() {
		logger.debug("BookCategoriesDao is called!!");
		return new BookCategoriesDaoImpl();
	}
	
	@Bean(name="contextProviderDao")	            
	public IBaseDao<ContextProvider> ContextProviderDao() {
		logger.debug("ContextProviderDao is called!!");
		return new ContextProviderDaoImpl();
	}
	
	@Bean(name="bookItemsDao")	            
	public IBookItemsDao BookItemsDao() {
		logger.debug("bookitemsDao is called!!");
		return new BookItemsDaoImpl();
	}
	
	@Bean(name="bookCitiesDao")	            
	public IBaseDao<BookCities> BookCitiesDao() {
		logger.debug("bookCitiesDao is called!!");
		return new BookCitiesDaoImpl();
	}
	
	@Bean(name="book2cityDao")	            
	public IBaseDao<Book2City> Book2cityDao() {
		logger.debug("Book2cityDao is called!!");
		return new Book2CityDaoImpl();
	}
	
	@Bean(name="city2categoryDao")	            
	public IBaseDao<City2Category> City2categoryDao() {
		logger.debug("City2categoryDao is called!!");
		return new City2CategoryDaoImpl();
	}
	
	@Bean(name="subscriptionsDao")	            
	public IBaseDao<Subscriptions> SubscriptionsDao() {
		logger.debug("SubscriptionsDao is called!!");
		return new SubscriptionsDaoImpl();
	}
	
	@Bean(name="subscribe4iOSDao")	            
	public IBaseDao<Subscribe4iOS> Subscribe4iOSDao() {
		logger.debug("Subscribe4iOSDao is called!!");
		return new Subscribe4iOSDaoImpl();
	}
	
	@Bean(name="productID2BookDao")	            
	public IBaseDao<ProductID2Book> ProductID2BookDao() {
		logger.debug("ProductID2BookDao is called!!");
		return new ProductID2BookDaoImpl();
	}
}
